package cn.yangyanzhao.dubbo.client;

import java.io.IOException;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import cn.yangyanzhao.dubbo.server.IHello;

/**
 * Hello world!
 *
 */
public class App 
{
    private static ClassPathXmlApplicationContext content;

	public static void main( String[] args ) throws IOException
    {
    	content = new ClassPathXmlApplicationContext("dubbo-client.xml");
    	
    	//得到IHello的远程代理对象
    	IHello iHello = (IHello) content.getBean("myHello");
    	String result = iHello.sayHello("Tom2");
    	System.out.println(result);
    	System.in.read();
    }
    
}
